<template>
    <div style="height: 3000px"></div>
</template>
<script setup lang="ts">
import { useMouse, debounceFilter } from '@vueuse/core'
import { onMounted } from 'vue'

// 获取鼠标坐标

// const mouse = useMouse()     
const mouse = useMouse({ eventFilter: debounceFilter(100) })    // 去抖

onMounted(() => {
    document.getElementsByTagName("html")[0].onmousemove = function () {
        console.log(mouse.x.value, mouse.y.value)
    }
    console.log('w')
})
</script>